<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>lwIP: Traps</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">lwIP
   &#160;<span id="projectnumber">2.1.2</span>
   </div>
   <div id="projectbrief">Lightweight IP stack</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__snmp__traps.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Traps<div class="ingroups"><a class="el" href="group__apps.html">Applications</a> &raquo; <a class="el" href="group__snmp.html">SNMPv2c/v3 agent</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gafdd3299e145f53cc826cc11a469f8409"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#gafdd3299e145f53cc826cc11a469f8409">snmp_get_community_trap</a> (void)</td></tr>
<tr class="separator:gafdd3299e145f53cc826cc11a469f8409"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5631711f357b6610be7e93b1c6d87760"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#ga5631711f357b6610be7e93b1c6d87760">snmp_set_community_trap</a> (const char *const community)</td></tr>
<tr class="separator:ga5631711f357b6610be7e93b1c6d87760"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab101505be59778cf0f2f1ac40bcf3f32"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#gab101505be59778cf0f2f1ac40bcf3f32">snmp_trap_dst_enable</a> (u8_t dst_idx, u8_t enable)</td></tr>
<tr class="separator:gab101505be59778cf0f2f1ac40bcf3f32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga15e4afbf80ed2260850842e6608c6d86"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#ga15e4afbf80ed2260850842e6608c6d86">snmp_trap_dst_ip_set</a> (u8_t dst_idx, const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *dst)</td></tr>
<tr class="separator:ga15e4afbf80ed2260850842e6608c6d86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacaf816ff917f7b7e5d00ed6c9f79b51c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#gacaf816ff917f7b7e5d00ed6c9f79b51c">snmp_set_auth_traps_enabled</a> (u8_t enable)</td></tr>
<tr class="separator:gacaf816ff917f7b7e5d00ed6c9f79b51c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7804a22615bd9b3a323a3f48a9fb8cb7"><td class="memItemLeft" align="right" valign="top">u8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#ga7804a22615bd9b3a323a3f48a9fb8cb7">snmp_get_auth_traps_enabled</a> (void)</td></tr>
<tr class="separator:ga7804a22615bd9b3a323a3f48a9fb8cb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga96cc7af0118d75049609872ea41187cd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#ga96cc7af0118d75049609872ea41187cd">snmp_send_trap</a> (const struct <a class="el" href="structsnmp__obj__id.html">snmp_obj_id</a> *eoid, s32_t generic_trap, s32_t specific_trap, struct <a class="el" href="structsnmp__varbind.html">snmp_varbind</a> *varbinds)</td></tr>
<tr class="separator:ga96cc7af0118d75049609872ea41187cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0e044259289cb690197173f93c17607d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#ga0e044259289cb690197173f93c17607d">snmp_send_trap_generic</a> (s32_t generic_trap)</td></tr>
<tr class="separator:ga0e044259289cb690197173f93c17607d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga56bdce04e9e77cb3f8a872718cd273d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#ga56bdce04e9e77cb3f8a872718cd273d1">snmp_send_trap_specific</a> (s32_t specific_trap, struct <a class="el" href="structsnmp__varbind.html">snmp_varbind</a> *varbinds)</td></tr>
<tr class="separator:ga56bdce04e9e77cb3f8a872718cd273d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa8a49d1a6a207740ba44e27b5bbc22be"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#gaa8a49d1a6a207740ba44e27b5bbc22be">snmp_coldstart_trap</a> (void)</td></tr>
<tr class="separator:gaa8a49d1a6a207740ba44e27b5bbc22be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf6d0a95a3a406d8ea00849c07aca05ee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__snmp__traps.html#gaf6d0a95a3a406d8ea00849c07aca05ee">snmp_authfail_trap</a> (void)</td></tr>
<tr class="separator:gaf6d0a95a3a406d8ea00849c07aca05ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="gaf6d0a95a3a406d8ea00849c07aca05ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf6d0a95a3a406d8ea00849c07aca05ee">&#9670;&nbsp;</a></span>snmp_authfail_trap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void snmp_authfail_trap </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Send authentication failure trap (used internally by agent) </p>

</div>
</div>
<a id="gaa8a49d1a6a207740ba44e27b5bbc22be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa8a49d1a6a207740ba44e27b5bbc22be">&#9670;&nbsp;</a></span>snmp_coldstart_trap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void snmp_coldstart_trap </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Send coldstart trap </p>

</div>
</div>
<a id="ga7804a22615bd9b3a323a3f48a9fb8cb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7804a22615bd9b3a323a3f48a9fb8cb7">&#9670;&nbsp;</a></span>snmp_get_auth_traps_enabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">u8_t snmp_get_auth_traps_enabled </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get authentication traps enabled state </p>

</div>
</div>
<a id="gafdd3299e145f53cc826cc11a469f8409"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafdd3299e145f53cc826cc11a469f8409">&#9670;&nbsp;</a></span>snmp_get_community_trap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* snmp_get_community_trap </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Returns current SNMP community string used for sending traps. </p><dl class="section return"><dt>Returns</dt><dd>current SNMP community string used for sending traps </dd></dl>

</div>
</div>
<a id="ga96cc7af0118d75049609872ea41187cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga96cc7af0118d75049609872ea41187cd">&#9670;&nbsp;</a></span>snmp_send_trap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> snmp_send_trap </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structsnmp__obj__id.html">snmp_obj_id</a> *&#160;</td>
          <td class="paramname"><em>eoid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">s32_t&#160;</td>
          <td class="paramname"><em>generic_trap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">s32_t&#160;</td>
          <td class="paramname"><em>specific_trap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsnmp__varbind.html">snmp_varbind</a> *&#160;</td>
          <td class="paramname"><em>varbinds</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sends a generic or enterprise specific trap message.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">eoid</td><td>points to enterprise object identifier </td></tr>
    <tr><td class="paramname">generic_trap</td><td>is the trap code </td></tr>
    <tr><td class="paramname">specific_trap</td><td>used for enterprise traps when generic_trap == 6 </td></tr>
    <tr><td class="paramname">varbinds</td><td>linked list of varbinds to be sent </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>ERR_OK when success, ERR_MEM if we're out of memory</dd></dl>
<dl class="section note"><dt>Note</dt><dd>the use of the enterprise identifier field is per RFC1215. Use .iso.org.dod.internet.mgmt.mib-2.snmp for generic traps and .iso.org.dod.internet.private.enterprises.yourenterprise (sysObjectID) for specific traps. </dd></dl>
<p>send to the TRAP destination </p>

</div>
</div>
<a id="ga0e044259289cb690197173f93c17607d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0e044259289cb690197173f93c17607d">&#9670;&nbsp;</a></span>snmp_send_trap_generic()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> snmp_send_trap_generic </td>
          <td>(</td>
          <td class="paramtype">s32_t&#160;</td>
          <td class="paramname"><em>generic_trap</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Send generic SNMP trap </p>

</div>
</div>
<a id="ga56bdce04e9e77cb3f8a872718cd273d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga56bdce04e9e77cb3f8a872718cd273d1">&#9670;&nbsp;</a></span>snmp_send_trap_specific()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__infrastructure__errors.html#gaf02d9da80fd66b4f986d2c53d7231ddb">err_t</a> snmp_send_trap_specific </td>
          <td>(</td>
          <td class="paramtype">s32_t&#160;</td>
          <td class="paramname"><em>specific_trap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structsnmp__varbind.html">snmp_varbind</a> *&#160;</td>
          <td class="paramname"><em>varbinds</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Send specific SNMP trap with variable bindings </p>

</div>
</div>
<a id="gacaf816ff917f7b7e5d00ed6c9f79b51c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacaf816ff917f7b7e5d00ed6c9f79b51c">&#9670;&nbsp;</a></span>snmp_set_auth_traps_enabled()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void snmp_set_auth_traps_enabled </td>
          <td>(</td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable/disable authentication traps </p>

</div>
</div>
<a id="ga5631711f357b6610be7e93b1c6d87760"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5631711f357b6610be7e93b1c6d87760">&#9670;&nbsp;</a></span>snmp_set_community_trap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void snmp_set_community_trap </td>
          <td>(</td>
          <td class="paramtype">const char *const&#160;</td>
          <td class="paramname"><em>community</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets SNMP community string used for sending traps. The string itself (its storage) must be valid throughout the whole life of program (or until it is changed to sth else).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">community</td><td>is a pointer to new trap community string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gab101505be59778cf0f2f1ac40bcf3f32"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab101505be59778cf0f2f1ac40bcf3f32">&#9670;&nbsp;</a></span>snmp_trap_dst_enable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void snmp_trap_dst_enable </td>
          <td>(</td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>dst_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>enable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets enable switch for this trap destination. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dst_idx</td><td>index in 0 .. SNMP_TRAP_DESTINATIONS-1 </td></tr>
    <tr><td class="paramname">enable</td><td>switch if 0 destination is disabled &gt;0 enabled. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga15e4afbf80ed2260850842e6608c6d86"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga15e4afbf80ed2260850842e6608c6d86">&#9670;&nbsp;</a></span>snmp_trap_dst_ip_set()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void snmp_trap_dst_ip_set </td>
          <td>(</td>
          <td class="paramtype">u8_t&#160;</td>
          <td class="paramname"><em>dst_idx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="group__ipaddr.html#ga16ef96d6cde029029bbf47fee35fd67a">ip_addr_t</a> *&#160;</td>
          <td class="paramname"><em>dst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sets IPv4 address for this trap destination. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dst_idx</td><td>index in 0 .. SNMP_TRAP_DESTINATIONS-1 </td></tr>
    <tr><td class="paramname">dst</td><td>IPv4 address in host order. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
